1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus, and also to a recording medium.
2. Description of the Related Art
To obtain a high-quality image from image data when it is output from a printer or a display unit, it is necessary to perform color processing, such as color correction, color conversion, binary-quantizing processing, etc., according to the type of object, on each of a plurality of objects forming the image. Generally, to print or display an image created by a computer application to a printer or on a display unit, a device driver or a device forms an image from a group of drawing commands output from the application and generates image data of the whole page.
A drawing command group forming a document is issued to a device driver according to the type of data, such as, image drawing commands issued for photographs, text drawing commands output for text, and graphics drawing commands issued for graphics. Then, the device driver performs color processing suitable for the object according to the type of command and converts the data into an image of the form which can be output by the output device.
In this case, color-matching processing can be switched according to the type of data, such as saturation color processing for graphics, colorimetric processing for text, and perceptual color processing for photographs, thereby achieving a high quality output on all the objects of the whole page.
By utilizing a certain type of system and application, it has become possible to specify a source color space for the objects, enabling the device driver to perform color processing by using the specified source color space, resulting in a higher quality output. More specifically, for example, when an image input by a scanner is pasted in a document, a color profile indicating the device characteristics of the scanner is specified for the corresponding image drawing commands. Or, when color calibration is performed on a display unit, a color profile indicating the characteristics of the monitor used can be designated to reproduce the color viewed by the editor. The above-mentioned color profiles are, for example, International Color Consortium (ICC) profiles, which can be used by the system, such as the Windows ICM system of Microsoft Corporation, or the ColorSync system of Apple Computer Inc.
However, even by the use of such a precise color-matching processing system, if an original photographic image is a poor quality, a high quality and aesthetically pleasant image cannot be expected. For example, in a conventional system, if an image photographed by a digital camera, which is coming into widespread use, is unsuitably exposed, the resulting image faithfully reflects the unsuitably exposed image when it is printed, thereby failing to achieve an image of a very good quality. In order to overcome such a drawback, a user performs image correction, such as nonlinear color balance processing, for correcting the inappropriate exposure of the document image, on the whole document image by using, for example, image retouching software. However, the user without a good knowledge and experience in the corresponding operation has to depend on trial-and-error methods in order to set a suitable correcting operation, which is very time-consuming.
Additionally, concerning already printed document data, such as a DTP document pasted with an uncorrected photograph, the following complicated operation is necessary to conduct image correction only on the photograph portion of the document image. That is, an image portion should be first designated and cut from the document image, and then corrected by using the image retouching software, and again pasted in the document image.
In a comparatively high-end application which aims to optimize the efficiency in using the memory and the processing rate, a large image, such as that shown in FIG. 8, may sometimes be internally divided and processed by a plurality of image drawing commands. This type of processing is often executed in, for example, the Adobe PhotoShop v4.0 application.
Thus, if the operation for determining conditions for performing color processing, for example, for correcting the exposure of the document image, according to the color distribution of the document image, is conducted on each of the divided object images, the following problem arises. Color processing conditions are set for each of the different parts which have been internally divided from a single original image by using an application. This may disadvantageously disturb the continuity of color at the interfaces of the parts.
It is also necessary to analyze the color distribution of the original image for automatically setting image-correction processing, such as nonlinear color balancing for correcting the exposure of the original image. Conventionally, to increase the processing rate, image data is sampled according to predetermined sampling conditions regardless of the image conditions. However, by using this conventional method in current systems for inputting various sizes of image data, a sufficient number of samples of image data is not provided, thereby failing to set optimal processing conditions, or an excessively large number-of samples of image data is provided, thereby increasing the processing time. That is, according to the conventional method, optimal processing conditions cannot be efficiently set.
Accordingly, in view of the above background, it is an object of the present invention to easily perform suitable image-correction processing.
It is another object of the present invention to automatically perform image-correction processing on a predetermined type of object image contained in an input image in accordance with the color distribution.
It is still another object of the present invention to suitably determine whether image-correction processing in accordance with the color distribution of an input image is to be performed.
It is a further object of the present invention to obtain a high-quality output image by setting the same color processing conditions for a single original image.
It is a further object of the present invention to efficiently determine color processing conditions by setting the sampling conditions according to the size of image data.
To achieve the above-described object, according to one aspect of the present invention, there is provided an image processing method for performing image-correction processing in accordance with a color distribution of an input image. The method includes the steps of inputting an image object which forms the input image, determining the type of the input image object, and controlling, based on a result obtained in the determining step, a determination of whether the image-correction processing in accordance with the color distribution of the image object is to be performed on the image object.
According to another aspect of the present invention, there is provided an image processing method, including inputting image data representing an input image, determining whether color-matching processing has been performed on the image data by analyzing header information of the image data, and making a decision, based on a result obtained in the determining step, of whether image-correction processing in accordance with a color distribution of the input image is to be performed.
According to still another aspect of the present invention, there is provided an image processing apparatus including image processing means for performing image-correction processing in accordance with a color distribution of an input image. Input means inputs image objects which form the image. Determining means determines the type of each of the input image objects. Control means controls, based on a result obtained by the determining means, whether the image-correction processing in accordance with the color distribution of the image object is to be performed. Synthesizing means synthesizes the image objects which have undergone the image-correction processing so as to obtain a synthesized image. Output means outputs the synthesized image.
According to a further aspect of the present invention, there is provided an image processing apparatus including input means for inputting image data representing an input image. Determining means determines whether color-matching processing has been performed on the image data by analyzing header information of the image data. Decision means makes a decision, based on a result obtained by the determining means, of whether image-correction processing in accordance with a color distribution of the input image is to be performed on the input image. Image-correction processing means performs the image-correction processing on the input image according to a result obtained by the decision means.
According to a further aspect of the present invention, there is provided a recording medium for recording a program implementing an image processing method for performing image-correction processing in accordance with a color distribution of an input image. The program includes the steps of inputting an image object which forms the input image, determining the type of the input image object, and controlling, based on a result obtained in the determining step, a determination of whether the image-correction processing in accordance with the color distribution of the image object is to be performed on the image object.
According to a further aspect of the present invention, there is provided a recording medium for recording an image processing program. The program includes the steps of inputting image data representing an input image, determining whether color-matching processing has been performed on the image data by analyzing header information of the image data, and making a decision, based on a result obtained in the determining step, of whether image-correction processing in accordance with a color distribution of the input image is to be performed.
According to a further aspect of the present invention, there is provided an image processing method for performing color processing in accordance with a plurality of image objects. The method includes the steps of inputting image data indicating the plurality of image objects, analyzing a relationship between the plurality of image objects, grouping the plurality of image objects based on a result obtained in the analyzing step, and setting an identical color processing condition for the grouped image objects.
According to a further aspect of the present invention, there is provided an image processing method, including the steps of inputting image data representing an input image, setting a sampling condition in accordance with a data size of the input image, sampling the input image data according to the sampling condition set in the setting step, and determining a processing condition by analyzing the sampled image data.
According to a further aspect of the present invention, there is provided an image processing apparatus for performing color processing in accordance with a plurality of image objects. The apparatus includes input means for inputting image data representing the plurality of image objects. Analyzing means analyzes a relationship between the plurality of image objects. Grouping means groups the plurality of image objects based on a result obtained by the analyzing means. Setting means sets an identical color processing condition for the grouped image objects. Color processing means performs color processing on the image objects based on the color processing condition set by the setting means.
According to a further aspect of the present invention, there is provided an image processing apparatus including input means for inputting image data representing an input image. Setting means sets a sampling condition in accordance with a data size of the input image. Sampling means samples the input image data according to the sampling condition set by the setting means. Determining means determines a processing condition by analyzing the image to data sampled by the sampling means.
According to a further aspect of the present invention, there is provided a recording medium for recording a program implementing an image processing method for performing color processing in accordance with a plurality of image objects. The program including the steps of inputting image data representing the plurality of image objects, analyzing a relationship between the plurality of image objects, grouping the plurality of image objects based on a result obtained by the analyzing means, and setting an identical color processing condition for the grouped image objects.
According to a further aspect of the present invention, there is provided a recording medium for recording a program implementing processing for setting a processing condition. The program includes the steps of setting a sampling condition in accordance with a data size of the input image, sampling the input image data according to the sampling condition set in the setting step, and determining a processing condition by analyzing the sampled image data.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.